<script type="text/javascript">
    var cookie_style = $.cookie("mystyle");
    if (cookie_style == null) {} else {
        $("link[name='color']").attr("href", maccms.path_tpl + "/asset/css/" + cookie_style + ".css?v={:system_version()}")
    }
    $(function() {
        var cookie_style = $.cookie("mystyle");
        if (cookie_style == null) {
            if ({$tplconfig['theme']['color']['ms']} == 'black') {
                $("#black").addClass("hide");
                $("#white").removeClass("hide")
            } else {
                $("#white").addClass("hide");
                $("#black").removeClass("hide")
            }
        } else {
            $("[id='" + cookie_style + "'].mycolor").addClass("hide");
            $("[id!='" + cookie_style + "'].mycolor").removeClass("hide")
        }
    });
    var cookie_themes = $.cookie("mythemes");
    if (cookie_themes == null) {} else {
        $("link[name='skin']").attr("href", maccms.path_tpl + "/asset/css/" + cookie_themes + ".css?v={:system_version()}")
    }
    $(function() {
        var cookie_themes = $.cookie("mythemes");
        if (cookie_themes == null) {
            if ({$tplconfig['theme']['color']['select']} == 'green') {
                $("#themes li#green").addClass("cur")
            } else if ({$tplconfig['theme']['color']['select']} == 'blue') {
                $("#themes li#blue").addClass("cur")
            } else if ({$tplconfig['theme']['color']['select']} == 'pink') {
                $("#themes li#pink").addClass("cur")
            } else if ({$tplconfig['theme']['color']['select']} == 'red') {
                $("#themes li#red").addClass("cur")
            } else if ({$tplconfig['theme']['color']['select']} == 'gold') {
                $("#themes li#gold").addClass("cur")
            } else {
                $("#themes li#default").addClass("cur")
            }
        } else {
            $("#themes li[id='" + cookie_themes + "']").addClass("cur")
        }
    })
</script>